import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../views/login.vue')
    },
    {
      path: '/home',
      name: 'home',
      redirect: '/home',
      component: () => import('../views/index.vue'),
      meta:{
        content:"content: 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes"
      },
      children:[
        {
          path: '/cm',
          name: 'CustomerManagement',
          component: () => import('../views/info_manage/cust_manage.vue')
        },
        {
          path: '/st',
          name: 'StaffManagement',
          component: () => import('../views/info_manage/staf_manage.vue')
        },
        {
          path: '/bs',
          name: 'BusinessManagement',
          component: () => import('../views/info_manage/bus_manage.vue')
        },
        {
          path: '/wo',
          name: 'WorkOrderManagement',
          component: () => import('../views/info_manage/wo_manage.vue')
        },
        {
          path: '/home',
          name: "Home",
          component: () => import('../views/home.vue')
        },
        {
          path: '/data_show',
          name: 'Data',
          component: () => import('../views/data.vue')
        }
        
      ]

    },    
  ],
})

export default router
